package com.ssish.saas.eccs.mapper;

import com.ssish.saas.eccs.model.Sycankbrh;
import com.ssish.saas.eccs.model.SycankbrhExample;
import com.ssish.saas.eccs.model.SycankbrhKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface SycankbrhMapper {
    int countByExample(SycankbrhExample example);

    int deleteByExample(SycankbrhExample example);

    @Delete({
        "delete from SYC_BANKBRH",
        "where BANKCD = #{bankcd,jdbcType=VARCHAR}",
          "and BANKBRHCD = #{bankbrhcd,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(SycankbrhKey key);

    @Insert({
        "insert into SYC_BANKBRH (BANKCD, BANKBRHCD, ",
        "INSBY, INSDT, ",
        "UPDBY, UPDDT, ",
        "FULLNM, ADDR1, ADDR2, ",
        "POSTCD, CITY, STATECD, ",
        "CTRYCD, TELNO, FAXNO)",
        "values (#{bankcd,jdbcType=VARCHAR}, #{bankbrhcd,jdbcType=VARCHAR}, ",
        "#{insby,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, ",
        "#{updby,jdbcType=VARCHAR}, #{upddt,jdbcType=TIMESTAMP}, ",
        "#{fullnm,jdbcType=VARCHAR}, #{addr1,jdbcType=VARCHAR}, #{addr2,jdbcType=VARCHAR}, ",
        "#{postcd,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{statecd,jdbcType=VARCHAR}, ",
        "#{ctrycd,jdbcType=VARCHAR}, #{telno,jdbcType=VARCHAR}, #{faxno,jdbcType=VARCHAR})"
    })
    int insert(Sycankbrh record);

    int insertSelective(Sycankbrh record);

    List<Sycankbrh> selectByExample(SycankbrhExample example);

    @Select({
        "select",
        "BANKCD, BANKBRHCD, INSBY, INSDT, UPDBY, UPDDT, FULLNM, ADDR1, ADDR2, POSTCD, ",
        "CITY, STATECD, CTRYCD, TELNO, FAXNO",
        "from SYC_BANKBRH",
        "where BANKCD = #{bankcd,jdbcType=VARCHAR}",
          "and BANKBRHCD = #{bankbrhcd,jdbcType=VARCHAR}"
    })
    @ResultMap("BaseResultMap")
    Sycankbrh selectByPrimaryKey(SycankbrhKey key);

    int updateByExampleSelective(@Param("record") Sycankbrh record, @Param("example") SycankbrhExample example);

    int updateByExample(@Param("record") Sycankbrh record, @Param("example") SycankbrhExample example);

    int updateByPrimaryKeySelective(Sycankbrh record);

    @Update({
        "update SYC_BANKBRH",
        "set INSBY = #{insby,jdbcType=VARCHAR},",
          "INSDT = #{insdt,jdbcType=TIMESTAMP},",
          "UPDBY = #{updby,jdbcType=VARCHAR},",
          "UPDDT = #{upddt,jdbcType=TIMESTAMP},",
          "FULLNM = #{fullnm,jdbcType=VARCHAR},",
          "ADDR1 = #{addr1,jdbcType=VARCHAR},",
          "ADDR2 = #{addr2,jdbcType=VARCHAR},",
          "POSTCD = #{postcd,jdbcType=VARCHAR},",
          "CITY = #{city,jdbcType=VARCHAR},",
          "STATECD = #{statecd,jdbcType=VARCHAR},",
          "CTRYCD = #{ctrycd,jdbcType=VARCHAR},",
          "TELNO = #{telno,jdbcType=VARCHAR},",
          "FAXNO = #{faxno,jdbcType=VARCHAR}",
        "where BANKCD = #{bankcd,jdbcType=VARCHAR}",
          "and BANKBRHCD = #{bankbrhcd,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(Sycankbrh record);
}